package edu.unsw.comp9321.jdbc;

import java.io.Serializable;


public class CarTypeDTO implements Serializable{

	private static final long serialVersionUID = 1L;
	private int id;
	private String typeClass;
	private String makeModel;
	private String bodyType;
	private boolean isAutomatic;
	private double dailyRate;
	
	public CarTypeDTO (int id, String typeClass, String makeModel, String bodyType, 
			boolean isAutomatic, double dailyRate) {
		super();
		this.setId(id);
		this.setTypeClass(typeClass);
		this.setMakeModel(makeModel);
		this.setBodyType(bodyType);
		this.setAutomatic(isAutomatic);
		this.setDailyRate(dailyRate);
	}

	public CarTypeDTO(){
		
	}
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getTypeClass() {
		return typeClass;
	}

	public void setTypeClass(String typeClass) {
		this.typeClass = typeClass;
	}

	public String getMakeModel() {
		return makeModel;
	}

	public void setMakeModel(String makeModel) {
		this.makeModel = makeModel;
	}

	public String getBodyType() {
		return bodyType;
	}

	public void setBodyType(String bodyType) {
		this.bodyType = bodyType;
	}

	public boolean isAutomatic() {
		return isAutomatic;
	}

	public void setAutomatic(boolean isAutomatic) {
		this.isAutomatic = isAutomatic;
	}

	public double getDailyRate() {
		return dailyRate;
	}

	public void setDailyRate(double dailyRate) {
		this.dailyRate = dailyRate;
	}
	
	public boolean equals(Object o){
		if (o instanceof CarTypeDTO) {
			CarTypeDTO toCompare = (CarTypeDTO) o;
			if (this.id == toCompare.getId())
				return true;
		}
		return false;
	}
}
